import { Map } from "immutable";

import * as actionTypes from "./constants";

const defaultStete = Map({
  djPlaylists: [],
  djProgramRecommend: [],
  djProgramToplist: [],
  djRadioHotLists: [],
  djRadioRecommend: [],
});
const a = (state = defaultStete, action) => {
  switch (action.type) {
    case actionTypes.DJCATELIST:
      return state.set("djPlaylists", action.djCatelists);
    case actionTypes.GETPROGRAMRECOMMEND:
      return state.set("djProgramRecommend", action.djProgramRecommend);
    case actionTypes.GETPROGRAMTOPLIST:
      return state.set("djProgramToplist", action.djProgramToplist);
    case actionTypes.GETDJRADIOHOT:
      return state.set("djRadioHotLists", action.DjRadioHotLists);
    case actionTypes.GETDJRADIORECOMMENDTYPE:
      return state.set("djRadioRecommend", action.djRadioRecommend);
    default:
      return state;
  }
};
export default a;
